//
//  GJTextField.m
//  YDGJ
//
//  Created by 黄卫 on 17/2/24.
//  Copyright © 2017年 huangwei. All rights reserved.
//

#import "GJTextField.h"
#import "FD_Method.h"

@implementation GJTextField

- (void)layoutSubviews
{
    [super layoutSubviews];
    
    if (self.tag == 2016) { //修改入驻页面清除按钮的位置
        
        if (self.rightView) {
            self.rightView.x -= 15;
        }
        
        /** 是否能获取该属性 */
        if([FD_Method getVariableWithClass:[UITextField class] varName:@"_clearButton"])
        {
            UIView *cleanbutton = [self valueForKey:@"_clearButton"];
            cleanbutton.x -= 8;
        }
    }
    
    if (self.tag == 2017) { //改变修改密码页面清除按钮的位置
        /** 是否能获取该属性 */
        if([FD_Method getVariableWithClass:[UITextField class] varName:@"_clearButton"])
        {
            UIView *cleanbutton = [self valueForKey:@"_clearButton"];
            cleanbutton.x += 7;
        }
    }
}


- (BOOL)becomeFirstResponder
{
    return [super becomeFirstResponder];
}

- (BOOL)resignFirstResponder
{
    return [super resignFirstResponder];
}

@end
